<style>
	#container{
		padding: 0px;
		border-radius:0px;
		border-width:0px;
	}
</style>
<form class="layui-form seller-alone-form" method="post">
	<input type="hidden" name="id" value="{$info.id}">
	<div class="layui-form-item">
		<label class="layui-form-label"><i class="required-color">*</i>名称：</label>
		<div class="layui-input-block">
			<input type="text" name="title" value="{$info.title}" required lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label"><i class="required-color">*</i>状态：</label>
		<div class="layui-input-block">
			<input type="radio" name="status" value="1" title="显示" {if $info.status == 1}checked="checked"{/if}>
			<input type="radio" name="status" value="2" title="隐藏" {if $info.status == 2}checked="checked"{/if}>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-block">
			{:jshopToken('index_edit')}
			<button type="button" class="layui-btn" lay-submit lay-filter="edit_index">保存</button>
			<button onclick="javascript:history.back(-1)" type="reset" class="layui-btn layui-btn-primary">返回</button>
		</div>
	</div>
</form>
<script>
	layui.use('form', function () {
		var form = layui.form;
		//监听提交
		form.on('submit(edit_index)', function (data) {
			JsPost("{:url('index/edit')}", data.field, function (res) {
				if (res.status) {
					layer.msg(res.msg, {time: 1300}, function () {
						window.location.href = "{:url('index/nav')}";
					});
				} else {
					layer.msg(res.msg);
				}
			})
		});
	});
</script>
<script type="text/javascript">
	var ue = UE.getEditor('container');
</script>